<#include "/layout/layout.ftl">
<#import "/layout/macro.ftl" as macro>
<#import "/layout/select.ftl" as my/>
<#assign css>
<#--此ftl中用到的css-->
</#assign>
<#assign js>
<#--此ftl中用到的js-->
	<script>
		$(".btn-submit").click(function () {
			// 校验表单合法
			var bootstrapValidator = $(".form-edit").data('bootstrapValidator');
			bootstrapValidator.validate();
			if(bootstrapValidator.isValid()){
				$.ajax({
					type: "POST",
					url: "/masterdraw/blockAccmout",
					data: $(".form-edit").serialize(),
					dataType: "JSON",
					success: function(res){
						layer.msg(res.message, {time: 2000
						}, function(){
							location.href="/masteraccount/drawapply";
						});
					}
				});
			}else{
				return false;
			}
		});

		$('.form-edit').bootstrapValidator({
			message: '请输入有效值',
			feedbackIcons: {
				valid: 'glyphicon glyphicon-ok',
				invalid: 'glyphicon glyphicon-remove',
				validating: 'glyphicon glyphicon-refresh'
			}
		});

	</script>
</#assign>
<@layout title="冻结金额" active="masterdraw">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			<#if isAdd>
				新增
			<#else>
				编辑
			</#if>
			<small>冻结申请金额</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="/"><i class="fa fa-home"></i> 管理后台</a></li>
			<li><a href="#"><i class="fa fa-list-ul"></i> 平台财务管理</a></li>
			<li class="active"><i class="fa fa-edit"> 冻结金额</i>
				<#if isAdd>
					新增
				<#else>
					编辑
				</#if>
			</li>
		</ol>
	</section>
	<!-- Main content -->
	<section class="content">
		<div class="row">
			<div class="col-md-12">
				<!-- Default box -->
				<div class="box  box-primary">
					<form class="form-horizontal form-edit" method="post" action="masterdraw/blockAccmout">
						<div class="box-body">
							<input type="hidden" id="id" name="id" value="${drawApply.id!}">
							<input type="hidden" id="isAdd" name="isAdd" value="${isAdd?string('true','false')}">
							<div class="form-group">
								<label class="col-sm-2 control-label">申请金额：</label>
								<div class="col-sm-10">
									<input id="applyAmount" name="applyAmount" class="form-control" type="text" value="${drawApply.applyAmount!}" disabled >
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">冻结金额(元)：</label>
								<div class="col-sm-10">
									<input  placeholder="冻结金额" id="blockAmount" name="blockAmount" class="form-control" type="text" value="${drawApply.blockAmount!}" >
								</div>
							</div>
							<div class="box-footer">
								<button type="button" class="btn btn-default btn-back">返回</button>
								<button type="button" class="btn btn-info pull-right btn-submit">提交</button>
							</div>

					</form>
				</div>
				<!-- /.box -->
			</div>
		</div>
	</section>
	<!-- /.content -->
</@layout>
